﻿using System;
using System.IO;
using System.Xml.Serialization;

namespace UtilityToolsCollect.ObjectsLibrary.Configs
{
    [Serializable]
    public abstract class ConfigurationBase 
    {
        [XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
        public string noNamespaceSchemaLocation = "Configuration.xsd";

        public static readonly string ConfigurationFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configuration.Config");
        public abstract void Sort();
        public abstract void Loaded();
    }
    [Serializable]
    public abstract class ConfigurationAbstract<T> : ConfigurationBase where T : ConfigurationBase, new()
    {
        protected static readonly T? DefaultEmpty = new();
        protected static T? m_Current = DefaultEmpty;
    }
}